Skip to content

fix resetting#2

Closed
mpapis wants to merge 2 commits into
postmodern:masterfrom
mpapis:patch-1
Closed

fix resetting#2
mpapis wants to merge 2 commits into
postmodern:masterfrom
mpapis:patch-1

Conversation

@mpapis

@mpapis mpapis commented Aug 23, 2012

Copy link
Copy Markdown
Contributor

fix resetting in case when removed path was moved to the end of PATH

mpapis added 2 commits August 23, 2012 03:34
fix resetting in case when removed path was moved to the end of PATH
@mpapis

mpapis commented Aug 23, 2012

Copy link
Copy Markdown
Contributor Author

this also makes sure that no accidental remove of longer similar paths will happen

@postmodern

Copy link
Copy Markdown
Owner

@mpapis checkout my attempt in the dirty_path branch.

@mpapis

mpapis commented Aug 24, 2012

Copy link
Copy Markdown
Contributor Author

I would propose to replace s|$RUBY/bin:||g with s|:$RUBY/bin:|:|g - this will avoid matching longer paths, example:

RUBY=/opt/rubies/1.9.3
PATH=/opt/rubies/1.9.3:/usr/opt/rubies/1.9.3

this would leave you with PATH=/usr - which I guess is not the intention.

@postmodern

Copy link
Copy Markdown
Owner

@mpapis like this?

@mpapis

mpapis commented Aug 24, 2012

Copy link
Copy Markdown
Contributor Author

yes, looks good

@postmodern

Copy link
Copy Markdown
Owner

Going to merge and close this. Thank you for pointing out these edge-cases. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants